package com.baogu.model.common;

public class HttpResult {
    private String code;
    private String msg;
    private Object Data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return Data;
    }

    public void setData(Object data) {
        Data = data;
    }

    public static HttpResult OK(Object obj){
        HttpResult result = new HttpResult();
        result.setCode("00000");
        result.setMsg("OK");
        result.setData(obj);
        return result;
    }

    public static HttpResult ERROR(String code,String msg){
        HttpResult result = new HttpResult();
        result.setMsg(msg);
        result.setCode(code);
        return result;
    }
}
